home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _B45FD6691B274AD0999EC52BF233136D < prev    next >
Encoding:
Text File  |  2004-01-06  |  2.5 KB  |  70 lines

  1. --------------------------------------------------
  2. --    Created By: Petar
  3.  
  4.  
  5. AIBehaviour.ModMorphAlert = {
  6.     Name = "ModMorphAlert",
  7.  
  8.  
  9.     ---------------------------------------------
  10.     OnPlayerSeen = function( self, entity, fDistance )
  11.  
  12.         entity:SelectPipe(0,"morpher_attack_wrapper");
  13.  
  14.         if (entity.AI_GunOut == nil) then
  15.             entity:InsertSubpipe(0,"DRAW_GUN");
  16.         end
  17.         entity:InsertSubpipe(0,"DropBeaconAt");
  18.     end,
  19.     ---------------------------------------------
  20.     OnEnemyMemory = function( self, entity )
  21.         -- called when the enemy can no longer see its foe, but remembers where it saw it last
  22.     end,
  23.     ---------------------------------------------
  24.     OnInterestingSoundHeard = function( self, entity )
  25.         -- called when the enemy hears an interesting sound
  26.     end,
  27.     ---------------------------------------------
  28.     OnThreateningSoundHeard = function( self, entity )
  29.         -- called when the enemy hears a scary sound
  30.     end,
  31.     ---------------------------------------------
  32.     OnReload = function( self, entity )
  33.         -- called when the enemy goes into automatic reload after its clip is empty
  34.     end,
  35.     ---------------------------------------------
  36.     OnGroupMemberDied = function( self, entity )
  37.         -- called when a member of the group dies
  38.     end,
  39.     ---------------------------------------------
  40.     OnNoHidingPlace = function( self, entity, sender )
  41.         -- called when no hiding place can be found with the specified parameters
  42.     end,    
  43.     ---------------------------------------------
  44.     OnReceivingDamage = function ( self, entity, sender)
  45.     end,
  46.     --------------------------------------------------
  47.     OnBulletRain = function ( self, entity, sender)
  48.         -- called when the enemy detects bullet trails around him
  49.     end,
  50.     --------------------------------------------------
  51.     OnCloseContact = function ( self, entity, sender)
  52.         entity:GoVisible();
  53.         entity:SelectPipe(0,"morpher_attack_wrapper");
  54.         if (entity.MELEE_ANIM_COUNT) then
  55.             local rnd = random(1,entity.MELEE_ANIM_COUNT);
  56.             local melee_anim_name = format("attack_melee%01d",rnd);
  57.             entity:InsertAnimationPipe(melee_anim_name,3);
  58.         else
  59.             Hud:AddMessage("==================UNACCEPTABLE ERROR====================");
  60.             Hud:AddMessage("Entity "..entity:GetName().." made melee attack but has no melee animations.");
  61.             Hud:AddMessage("==================UNACCEPTABLE ERROR====================");
  62.         end
  63.     end,
  64.     --------------------------------------------------
  65.     DECIDE_IF_INVESTIGATING_MORE = function ( self, entity, sender)
  66.         entity:SelectPipe(0,"stealth_hunt");
  67.     end,
  68.  
  69.  
  70. }